package client;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;

public class Client {

	public static void main(String[] args) {
		try {
			Socket socket = new Socket("localhost", 5000);
			ClientThread clientthread = new ClientThread(socket);
			clientthread.start();
			DataOutputStream dataOutputStream = new DataOutputStream(
					socket.getOutputStream());
			Scanner scanner = new Scanner(System.in);
			while (scanner.hasNextLine()) {
				dataOutputStream.writeUTF(scanner.nextLine());
			}
			scanner.close();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
